export function readFile() {

}

export function execScript(tabId, script) {
    chrome.scripting.executeScript({
        target: {tabId: tabId},
        func: script,
    });
}

export const getCurrentTab = () => new Promise((resolve, reject) => {
    chrome.tabs.query({active: true, currentWindow: true}, function(tabs) {
        var currentTab = tabs[0];
        if (currentTab) {
            resolve(currentTab);
        } else {
            reject("false");
        }
    });
});